"use strict";
cc._RF.push(module, 'eb6aciQ/8lO0JYTipi4S4ux', 'chat_historyIssue');
// scripts/chatRoom/chat_historyIssue.js

'use strict';

/**
 * 彩种开奖历史动画控制
 */
cc.Class({
    extends: cc.Component,

    properties: {
        isuseAnim: cc.Animation
    },

    // use this for initialization
    onLoad: function onLoad() {
        this.outOfWorld = cc.p(3000, 0);
        this.node.position = this.outOfWorld;
        var cbFadeOut = cc.callFunc(this.onFadeOutFinish, this);
        var cbFadeIn = cc.callFunc(this.onFadeInFinish, this);
        this.node.on('isuse-in', this.onShowIsuse, this);
        this.node.on('isuse-out', this.onHideIsuse, this);
    },

    onShowIsuse: function onShowIsuse() {
        this.isuseAnim.play('ani_issue_in');
    },

    onHideIsuse: function onHideIsuse() {
        var animState = this.isuseAnim.getAnimationState('ani_issue_out');
        if (animState.isPlaying) return;
        this.isuseAnim.play('ani_issue_out');
    },

    onIsuseEnd: function onIsuseEnd() {
        this.node.active = false;
    }
});

cc._RF.pop();